import java.util.*;
public class Text_Array {

	public static void main(String[] args) {
		ArrayList<Integer> list=new ArrayList<Integer>();
		list.add(2);
		list.add(2);
		System.out.println(Collections.frequency(list, 2));

	}

}
